<!---
	Title:		EPAR1.1 
	Author:		Bruce Frick
	Purpose:	index page
--->

<cfset BASE = CreateObject("component", "cfc.base") />
<cfset statusQueries = CreateObject("component", "cfc.statusQueries") />

<cfoutput>
<!---HTML header, css links, js links, and page title--->
#BASE.htmlHeader(
	"", <!---JS links--->
    "", <!---CSS links--->
    "Status Report", <!---Page Title--->
    "Status" <!---Active Nav Link--->
)#
<!---HTML header, css links, js links, and page title--->
    
    
    <cfif Session.bolAuth EQ True>
    
		<h1 class="title">Status Report</h1>
        <div class="entry">
        
        	Welcome, #Session.arrEmpInfo.FirstName# #Session.arrEmpInfo.LastName#.  
        	The page details the Steps in the Creation process and lists the 
        	number of employees staged at each.  <BR /> <BR />
            
            <cfset QUERIES.GetStepDetail = statusQueries.funcGetStepDetail() />
            
            <cfform name="status" method="post" action="">
            	
                <table align="center">
                    <cfloop query="QUERIES.GetStepDetail">
                        <cfset Desc = QUERIES.GetStepDetail.StepDesc>
                        <cfset AppGroup = QUERIES.GetStepDetail.AppGroup>
                        <cfset PageUser = QUERIES.GetStepDetail.Page_UserDirect>
                        <cfset PageHome = QUERIES.GetStepDetail.Page_Home>
                        <cfset NonSCFPageUser = QUERIES.GetStepDetail.NonSCFPage_UserDirect>
                        <cfset NonSCFPageHome = QUERIES.GetStepDetail.NonSCFPage_Home>
                 
                        <cfset QUERIES.GetSCFStepWaiting = statusQueries.funcGetSCFStepWaiting(QUERIES.GetStepDetail.ID) />
                        <cfset QUERIES.GetNONSCFStepWaiting = statusQueries.funcGetNONSCFStepWaiting(QUERIES.GetStepDetail.ID) />
                                                
                        <cfset SCFRecordCount = QUERIES.GetSCFStepWaiting.recordcount>
						<cfset NonSCFRecordCount = QUERIES.GetNONSCFStepWaiting.recordcount>
						<cfset TotalCount = NonSCFRecordCount + SCFRecordCount>
                        <tr>
                            <td valign="top" colspan="3">
                    			<span class="tableHeader">
                                   	#Desc# (#TotalCount#)
                                </span>     
                            </td>
						</tr>
                        <tr>
                            <td width="25">&nbsp;
                                
                            </td>
                        	<td valign="top"> 
                            	<table>
                                    <tr>               
                                        <td>
                                        	<strong>
											<cfif (Session.strAuthType EQ #AppGroup# OR Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR) AND PageHome NEQ "">
                                                <a href="#PageHome#">SCF EMPLOYEES</a>  
                                            <cfelse>
                                           		SCF EMPLOYEES 
                                    		</cfif>
                                            </strong>     
                                        </td>
                                    </tr>
									<cfif SCFRecordCount GT 0>
                                        <cfloop query="QUERIES.GetSCFStepWaiting">   
                                            <cfset Name =  Name>
                                            <cfset ActionID = ID>
                                    <tr>                  
                                        <td>
                                            <cfif (Session.strAuthType EQ #AppGroup# OR Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR) and PageUser NEQ ''>
                                                <a href="#PageUser#?StepID=#ActionID#">#Name#</a>
                                            <cfelse>
                                                #Name#
                                            </cfif>
                                        </td>
                                    </tr>
                                        </cfloop>
                                    <cfelse>
                                    <tr>           
                                        <td>
                                            <span class="error">At the present time, there are not any employees staged for this step.</span>
                                        </td>
                                    </tr>
                                    </cfif>
                        		</table>
                        	</td>
                        	<td valign="top"> 
                            	<table>
                                    <tr>     
                                        <td width = 25>&nbsp;</td>            
                                        <td>
                                           	<strong>                                           	
											<cfif (Session.strAuthType EQ #AppGroup# OR Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR) AND NonSCFPageHome NEQ "">
                                                <a href="#NonSCFPageHome#">CONTRACTORS</a>  
                                            <cfelse>
                                           		CONTRACTORS  
                                    		</cfif>                                            
                                            </strong>
                                        </td>
                                    </tr>
									<cfif NonSCFRecordCount GT 0>
                                        <cfloop query="QUERIES.GetNONSCFStepWaiting">   
                                            <cfset Name =  Name>
                                            <cfset ActionID = ID>
                                    <tr>     
                                        <td>&nbsp;</td>            
                                        <td>
                                            <cfif (Session.strAuthType EQ #AppGroup# OR Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR) and NonSCFPageUser NEQ ''>
                                                <a href="#NonSCFPageUser#?StepID=#ActionID#">#Name#</a>
                                            <cfelse>
                                                #Name#
                                            </cfif>
                                        </td>
                                    </tr>
                                        </cfloop>
                                    <cfelse>
                                    <tr>     
                                        <td>&nbsp;</td>        
                                        <td>
                                            <span class="error">At the present time, there are not any contractors staged for this step.</span>
                                        </td>
                                    </tr>
                                    </cfif>
                        		</table>
                        	</td>
                        </tr>
                        <tr>           
                        	<td>&nbsp;
                            	
                            </td>
                        </tr>
                    </cfloop>
                </table>
                
            </cfform>
        </div>
    
    <cfelse>
        <cfinclude template="Denied.cfm">
    </cfif>
    

<!---HTML footer, closes html and body tags.  Any footer info goes here--->
#BASE.htmlFooter()#
<!---HTML footer, closes html and body tags.  Any footer info goes here--->
</cfoutput>